// import instance from '../../../utils/request'
import instance from "../../../utils/request"
// 登录 
export function getdata() {
    return instance.get("/data")
}

export function deldata(id) {
    return instance.delete(`/data/${id}`)
}
export function getShopdata() {
    return instance.get("/shopdata")
}



export function updateShopdata(obj) {
    return instance.patch(`/data/${obj.id}`,obj)
}
export let http_addtable = (obj) => {
    return instance.post("/data", obj)
}

export let http_edittable = (obj) => {
    return instance.patch(`/data/${obj.id}`, obj)
}

export let http_table = (title1: string, title2: string, title3: string,title4: string) => {
    // console.log(title1, title2, title3, "| title1, title2, title3");
    
    return instance.get("/data",
        {
            params: { name_like: title1 != "" ? title1 : undefined,
            "flag": title2 != "" ? title2 : undefined,
            "address": title3 != "" ? title3 : undefined,
            "time": title4 != "" ? title4 : undefined }
            // params: { "stage_like": title3 }
        })
}